<!-- 考试记录详情 -->
<template>
	<view class="p-3">
		<view>
			<exam-item :item="obj"></exam-item>
		</view>
		<view>
			<subject v-for="q,idx in obj.examQuestionList" :key="idx" :index="idx+1" :item="q"></subject>
		</view>
	</view>
</template>

<script>
	import examItem from './components/exam-item.vue'
	import subject from "./components/subject.vue"
	import {examDetail} from "@/api/system/study.js"
	export default {
		components:{examItem, subject},
		onLoad(options) {
			this.pid = options.pid
			this.getData()
		},
		data() {
			return {
				pid:'',
				obj:{}
			}
		},
		methods: {
			getData(){
				examDetail(this.pid).then(res=>{
					console.log(res)
					this.obj = res.data 
				})
			}
		}
	}
</script>

<style>

</style>
